<!DOCTYPE html>
<html>
  <head>
  	<div th:include="base-libs :: base-libs" />
    <title>签约查询</title>
    <script th:src="@{/service/js/jtqy.js}"></script>
    
    <style>
    	.laydate-icon{
    		height:30px;
    		border-color:#B6B6B6
    	}
    	.north{
    		padding:8px 0px;
    		background:#f9f9f9;
    		overflow:hidden;
    	}
    	.tabs-wrap>.tabs>li>a{
			border-left:1px solid #438EB9!important;
			border-right:1px solid #438EB9!important;
			border-top:1px solid #438EB9!important;
		}
		.spanBtn{
			font-weight: bold;
			color: blue;
			cursor:pointer;
		}
		.timeLeft{
			width:36% !important;
		}
		.timeRight{
			width:36% !important;
			float:right;
		}
		.timeSpan{
			display:inline-block;
			width:4%;
			text-align:right;
		}
		.ssjg{
			display: none;
		}
		.datagrid-view2 .datagrid-body{
			overflow-x: hidden;
		}
		.combo{
			width:207px !important;
		}
    </style>
	  <script th:inline="javascript">
          /**读取request中的初始化数据*/
          var tdxxAry = [[${tdxxAry}]];
          var isGLJG = [[${isGLJG}]]; //是管理机构
          var PTJGID = [[${PTJGID}]];
          var fwbAry = [[${fwbAry}]];
	  </script>
	<script>
		var tabIndex = 0;
		$(function(){
			initView();
			initData();
		})

		function initData(){
            for(var i = 0; i < fwbAry.length ; i ++){
                var item = fwbAry[i];
                var option = $("<option>").val(item["FWBID"]).html(item["FWBMC"]);
                $(".FWBID").append(option);
            }

            initTableMethod.allTb();
            var tabIndex = StoreCache.removeCache("tabIndex");
            if(!StringUtils.isEmpty(tabIndex)){
                $('#tabs').tabs('select',parseInt(tabIndex));
            }
            $("body").css("visibility","visible");
        }

		function initView(){
            $(".combogridYljg").combogrid({
                height: 30
                ,width: 300
                ,panelWidth: 500
                ,singleSelect: true
                ,pagination: true
                ,idField: 'PTJGID'
                ,textField: 'YLJGMC'
                ,mode: "remote"
                ,url: contextRoot + "/yljgxx/queryPage.service"
                ,delay: 1000
                ,reversed: false
                ,columns:[[
                    {
                        field:'YLJGMC'
                        ,title:'机构名称'
                        ,width:240
                    }
                    ,{
                        field:'XZQHMC'
                        ,title:'行政区划'
                        ,width:80
                    }
                    ,{
                        field:'WSJGLBMC'
                        ,title:'机构类别'
                        ,width:80
                    }
                    ,{
                        field:'YYDJMC'
                        ,title:'机构等级'
                        ,width:80
                    }
                ]]
                ,onBeforeLoad: function(queryParams) {
                    var url = $(this).datagrid("options")["url"];
					/*URL不等空时再发送请求*/
                    if (!StringUtils.isEmpty(url)) {
                        queryParams["pageSize"] = queryParams["rows"];
                        queryParams["pageNumber"] = queryParams["page"];
                        queryParams["XZQHDM"] = parent.userInfo.JGXZQHDM;
                        queryParams["YLJGMC"] = queryParams["q"];
                        return true;
                    }else{
                        return false;
                    }
                },
                onClickRow : function(rowIndex, rowData){
                    selectObj["lastSelectJgmc"+tabIndex] = rowData.YLJGMC;
                    selectObj["lastSelectJgid"+tabIndex] = rowData.PTJGID;
                },
            });

			$('#tabs').tabs({
				border: true,
			    fit: true,
			    tabWidth: "150",
				onSelect: function(title,index){
                    tabIndex = index;
					var nowSelectTab = $(this).tabs('getTab',index); //获取到当前激活的tab
					var tableId = nowSelectTab.find("table").eq(1).attr("id");
					if(!StringUtils.isEmpty(tableId)){
						initTableMethod[tableId](); //初始化table
					}
					var tbObj = ['allTb','ydqTb','yjyTb','yzcTb'];
					$(document).off('keyup');
					enterToQuery(queryTableData,tbObj[index]);
				}
			})
            $("[name=YLTDID],[name=YQYTD]").createOptions(tdxxAry,{valueField : "TDID" , textField : "TDMC"});
			enterToQuery(queryTableData,'allTb');

			//开始时间与结束时间的互相限制
            timeSetting('allStartTime1','allStopTime1');
            timeSetting('ydqStartTime1','ydqStopTime1');
            timeSetting('yjyStartTime1','yjyStopTime1');
            timeSetting('yjyStartTime2','yjyStopTime2');
            timeSetting('yzcStartTime1','yzcStopTime1');
            timeSetting('yzcStartTime2','yzcStopTime2');
		}

		//时间段互相限制
		function timeSetting(startTagId,endTagId){
            var startTimeObj = {
                elem: '#'+ startTagId ,
                choose: function(datas){
                    endTimeObj.min = datas;
                }
            };
            laydate(startTimeObj);

            var endTimeObj = {
                elem: '#'+ endTagId,
                choose: function(datas){
                    startTimeObj.max = datas;
                }
            };
            laydate(endTimeObj);
		}
		
		function queryTableData(tableId){
			$("#"+tableId).datagrid("load");
		}
		
		function toAllDetail(row){
			switch (row.QYLX) {
				case "02":  //转介中
                    toZjzDetail(row,"0");
					break;
				case "03":
					toYjyDetail(row,"0");
					break;
				case "04":
					toYdqDetail(row,"0");
					break;
				case "00":
					toYyyDetail(row,"0");
					break;
				default:
					StoreCache.setCache("tabIndex", "0");
					StoreCache.setCache("fromQycx","true");
					visitAction(row,"detail");
					break;
			}
		}
		
		function toYdqDetail(row , index){
			StoreCache.setCache("tabIndex", "1");
			if(index){
				StoreCache.setCache("tabIndex", index);
			}
			visitAction(row,"ydqDetail");
		}
		
		function toYjyDetail(row ,index){
			StoreCache.setCache("tabIndex", "2");
			if(index){
				StoreCache.setCache("tabIndex", index);
			}
			visitAction(row,"yjyDetail");
		}
		
		function toYyyDetail(row ,index){
			StoreCache.setCache("tabIndex", "0");
			if(index){
				StoreCache.setCache("tabIndex", index);
			}
			visitAction(row,"yyyDetail");
		}

		/* 跳转到"转介中"详细 */
        function toZjzDetail(row ,index){
            if(index){
                StoreCache.setCache("tabIndex", index);
            }
            visitAction(row,"zjzDetail");
        }

		/* 跳转到"已转介"详细 */
		function toYzjDetail(row ,index){
			StoreCache.setCache("tabIndex", "3");
			if(index){
				StoreCache.setCache("tabIndex", index);
			}
			visitAction(row,"yzjDetail");
		}
		
		function visitAction(row,action){
			row.SZYY = row.YLJGMC;
			row.TDMC = row.QYTDMC;
			row.JLRY = row.QYYS;
			StoreCache.setCache("BACKINFO", "qycx.html");
			StoreCache.setCache("JTQYXQINFO", row);
			//location = "detail.html?to=" + action + "&JMXXID=" + row.JMXXID;
			$.QuickUrlUtils.redirectUrl("detail.html?to=" + action + "&JMXXID=" + row.JMXXID);
		}
		
		function modifyRowData(row){
			var qyztObj = {'00':'预签约','01':'已签约','02':'转介中','03':'已解约','04':'已到期','05':'已续约','06':'拒绝预签约','07':'同意预签约'};
			var qylxmc = qyztObj[row.QYLX] || row.QYLX;
			row.QYZT = qylxmc;
			return qylxmc;
		}
		
		function toXyManager(row){
			if(row.SFXY != "1"){
				StoreCache.setCache("tabIndex", "1");
				var back = {
						SUCCESS: "qycx.html",
						FAIL: "qycx.html"
					};
				row.SZYY = row.YLJGMC;
				row.TDMC = row.QYTDMC;
				StoreCache.setCache("XYBACKINFO", back);
				StoreCache.setCache("JTQYXYINFO", row);
				//location = "xyManager.html?JMXXID=" + row.JMXXID + "&YLJGID=" + row.YLJGID + "&TDID=" + row.TDID;
				$.QuickUrlUtils.redirectUrl("xyManager.html?JMXXID=" + row.JMXXID + "&YLJGID=" + row.YLJGID + "&TDID=" + row.TDID);
			}else{
				$.QuickAlert.alertFail({content : "该用户近期已有续约记录！"});
			}
		}

		/** 查询电子协议列表  */
		function queryDzxy(row){
			StoreCache.setCache("QYXX",row);
			parent.layer.open({
			    type: 2,
			    area: ["600px", "400px"],
			    content: contextRoot + 'jtqy/indexDzxy.html',
			    scrollbar: false,
			    resize: false,
			    title:'电子协议列表',
			    end: function(){
			        if(StoreCache.removeCache("refresh")){

			        }
			    }
			});
		}
		
		/** 初始化table的方法  */
		var initTableMethod = {
				//全部
				allTb: function(){
					var query = $('#allTb').data("query");
	    			if(!query){
	    				$('#allTb').data("query",true);
	    			}else{
	    				return;
	    			}
	    			$('#allTb').datagrid({
							idField : "QYXXID",
							striped : true,
							clickToSelect: true,
							fit:true,
							fitColumns: true,
							singleSelect: true,
							scrollbarSize:0,
							pagination : true,
							pageNumber : 1,
							pageSize : 10,
							pageList: [10, 25, 50, 100, 200],
							scrollBarSize:0,
							border: false,
							columns:[[
						   				{field:'XM', title:'姓名', width: 50, align: 'center'}
										,{field:'ZJHM', title:'证件号码', width: 100, align: 'center',formatter:function(value,row){
											return formatIdcard(value);
										}}
										,{field:'SJHM', title:'手机号码', width: 80, align: 'center'}
										,{field:'JTZZ', title:'家庭住址', width: 140, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'QYSJ', title:'签约时间', width: 100, align: 'center', formatter: function(value){
                                    		return formatTitle(value);
										}}
										,{field:'RQFLMC', title:'人群分类', width: 100, align: 'center', formatter: function(value){
                                    		return formatTitle(value);
										}}
                                		,{field:'SZYY', title:'所属机构', width: 100,hidden: true, align: 'center',formatter:function(value){
							    			return '<span title="' + value + '">' + value + '</span>'
										}}
										,{field:'QYTDMC', title:'签约团队', width: 100, align: 'center'}
										,{field:'FWBMC', title:'签约服务包', width: 130, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'QYLX', title:'签约状态', width: 70, align: 'center',formatter: function(value,row){
											value = modifyRowData(row);
											return value;
										}}
										,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row){
											var value = row.QYLX ; 
											if(value != '00' || value != '02'){
												row = JSON.stringify(row).replace(/"/g, '&quot;');
                                                return '<span class="spanBtn" onclick="toAllDetail(' + row + ')">详细</span>'
												 + '&nbsp;&nbsp;&nbsp;<span class="spanBtn" onclick="queryDzxy(' + row + ')">电子协议</span>';

											}
										}}
							]],
							onBeforeLoad: function(params){
								//params.USERID = parent.userInfo.USERID;
//								$(".allCondition [name=USERID]").val(parent.userInfo.USERID);
                                showColumns(this);
								getContainerDataByClassName('allCondition','condition',params);//查询条件
								formatTdid(params,'YLTDID');
                                formatQueryValue(params);
                                if(StringUtils.isEmpty(params.YLTDID)) return false;
							},
							url: contextRoot+"jtqy/queryPage.service"
					})
				},
				//已到期
				ydqTb: function(){
					var query = $('#ydqTb').data("query");
	    			if(!query){
	    				$('#ydqTb').data("query",true);
	    			}else{
	    				return;
	    			}
	    			$('#ydqTb').datagrid({
							idField : "QYXXID",
							striped : true,
							clickToSelect: true,
							fit:true,
							fitColumns: true,
							singleSelect: true,
							scrollbarSize:0,
							pagination : true,
							pageNumber : 1,
							pageSize : 10,
							pageList: [10, 25, 50, 100, 200],
							scrollBarSize:0,
							border: false,
							columns:[[
						   				{field:'XM', title:'姓名', width: 50, align: 'center'}
										,{field:'ZJHM', title:'证件号码', width: 100, align: 'center',formatter:function(value,row){
											return formatIdcard(value);
										}}
										,{field:'SJHM', title:'手机号码', width: 80, align: 'center'}
										,{field:'JTZZ', title:'家庭住址', width: 140, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'QYSJ', title:'签约时间', width: 100, align: 'center', formatter: function(value){
                                    		return formatTitle(value);
										}}
										,{field:'RQFLMC', title:'人群分类', width: 100, align: 'center', formatter: function(value){
											return formatTitle(value);
										}}
										,{field:'SZYY', title:'所属机构', width: 100,hidden: true, align: 'center',formatter:function(value){
											return '<span title="' + value + '">' + value + '</span>'
										}}
										,{field:'QYTDMC', title:'签约团队', width: 100, align: 'center'}
										,{field:'FWBMC', title:'签约服务包', width: 130, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'JSSJ', title:'到期时间', width: 70, align: 'center', formatter: function(value){
											if(!StringUtils.isEmpty(value)){
												return value.substring(0,10);
											}
										}}
										,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row){
											modifyRowData(row);
											row = JSON.stringify(row).replace(/"/g, '&quot;'); 
                                    		var btns = '<span class="spanBtn" onclick="toYdqDetail(' + row + ')">详细</span>'
                                                + '&nbsp;&nbsp;&nbsp;<span class="spanBtn" onclick="queryDzxy(' + row + ')">电子协议</span>';
											/*if($("#ydqCondition [name=YLTDID] option:checked").data("TDJS")==1){
                                    			//该页面只有查询，没有业务操作
												btns += '&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="toXyManager(' + row + ')">续约</a>';
											}*/
											return btns;
										}}
							]],
							onBeforeLoad: function(params){
// 								params.USERID = parent.userInfo.USERID;
// 								params.QYLX = '04'; //已到期
                                showColumns(this);
								$(".ydqCondition [name=USERID]").val(parent.userInfo.USERID);
								getContainerDataByClassName('ydqCondition','condition',params);//查询条件
								formatTdid(params,'YLTDID');
                                formatQueryValue(params);
                                if(StringUtils.isEmpty(params.YLTDID)) return false;
							},
							url: contextRoot+"jtqy/queryPage.service"
					})
				},
				//已解约
				yjyTb: function(){
					var query = $('#yjyTb').data("query");
	    			if(!query){
	    				$('#yjyTb').data("query",true);
	    			}else{
	    				return;
	    			}
	    			$('#yjyTb').datagrid({
							idField : "QYXXID",
							striped : true,
							clickToSelect: true,
							fit:true,
							fitColumns: true,
							singleSelect: true,
							scrollbarSize:0,
							pagination : true,
							pageNumber : 1,
							pageSize : 10,
							pageList: [10, 25, 50, 100, 200],
							scrollBarSize:0,
							border: false,
							columns:[[
						   				{field:'XM', title:'姓名', width: 50, align: 'center'}
										,{field:'ZJHM', title:'证件号码', width: 100, align: 'center',formatter:function(value,row){
											return formatIdcard(value);
											//return value;
										}}
										,{field:'SJHM', title:'手机号码', width: 80, align: 'center'}
										,{field:'JTZZ', title:'家庭住址', width: 140, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'QYSJ', title:'签约时间', width: 100, align: 'center', formatter: function(value){
                                    		return formatTitle(value);
										}}
										,{field:'RQFLMC', title:'人群分类', width: 100, align: 'center', formatter: function(value){
											return formatTitle(value);
										}}
										,{field:'SZYY', title:'所属机构', width: 100,hidden: true, align: 'center',formatter:function(value){
											return '<span title="' + value + '">' + value + '</span>'
										}}
										,{field:'QYTDMC', title:'签约团队', width: 100, align: 'center'}
										,{field:'FWBMC', title:'签约服务包', width: 130, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'JYSJ', title:'解约时间', width: 70, align: 'center', formatter: function(value){
											if(!StringUtils.isEmpty(value)){
												return value.substring(0,10);
											}
										}}
										,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row){
											modifyRowData(row);
											row = JSON.stringify(row).replace(/"/g, '&quot;'); 
//											return '<a href="javascript:void(0);" onclick="toYjyDetail(' + row + ')">详细</a>';
											return '<span class="spanBtn" onclick="toYjyDetail(' + row + ')">详细</span>'
                                                + '&nbsp;&nbsp;&nbsp;<span class="spanBtn" onclick="queryDzxy(' + row + ')">电子协议</span>';
										}}
							]],
							onBeforeLoad: function(params){
// 								params.USERID = parent.userInfo.USERID;
// 								params.QYLX = '03'; //已解约
                                showColumns(this);
								$(".yjyCondition [name=USERID]").val(parent.userInfo.USERID);
								getContainerDataByClassName('yjyCondition','condition',params);//查询条件
								formatTdid(params,'YLTDID');
                                formatQueryValue(params);
                                if(StringUtils.isEmpty(params.YLTDID)) return false;
							},
							url: contextRoot+"jtqy/queryPage.service"
					})
				},
				//已转出
				yzcTb: function(){
					var query = $('#yzcTb').data("query");
	    			if(!query){
	    				$('#yzcTb').data("query",true);
	    			}else{
	    				return;
	    			}
	    			$('#yzcTb').datagrid({
							idField : "QYXXID",
							striped : true,
							clickToSelect: true,
							fit:true,
							fitColumns: true,
							singleSelect: true,
							scrollbarSize:0,
							pagination : true,
							pageNumber : 1,
							pageSize : 10,
							pageList: [10, 25, 50, 100, 200],
							scrollBarSize:0,
							border: false,
							columns:[[
						   				{field:'XM', title:'姓名', width: 50, align: 'center'}
										,{field:'ZJHM', title:'证件号码', width: 100, align: 'center',formatter:function(value,row){
											return formatIdcard(value);
											//return value;
										}}
										,{field:'SJHM', title:'手机号码', width: 80, align: 'center'}
										,{field:'JTZZ', title:'家庭住址', width: 140, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'QYSJ', title:'签约时间', width: 100, align: 'center', formatter: function(value){
                                    		return formatTitle(value);
										}}
										,{field:'RQFLMC', title:'人群分类', width: 100, align: 'center', formatter: function(value){
											return formatTitle(value);
										}}
										,{field:'YLJGMC', title:'所属机构', width: 120, hidden: true, align: 'center',formatter:function(value){
											return '<span title="' + value + '">' + value + '</span>'
										}}
										,{field:'FWBMC', title:'签约服务包', width: 130, align: 'center',formatter: function(value,row){
											return formatTitle(value);
										}}
										,{field:'XQYTDMC', title:'已转介团队', width: 100, align: 'center'}
										,{field:'SQRQ', title:'转介时间', width: 70, align: 'center', formatter: function(value){
											if(!StringUtils.isEmpty(value)){
												return value.substring(0,10);
											}
										}}
										,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row){
											row = JSON.stringify(row).replace(/"/g, '&quot;'); 
											//return '<a href="javascript:void(0);" onclick="toYzjDetail(' + row + ')">详细</a>';
                                    		return '<span class="spanBtn" onclick="toYzjDetail(' + row + ')">详细</span>';

										}}
							]],
							onBeforeLoad: function(params){
// 								params.USERID = parent.userInfo.USERID;
// 								params.SHZT = 1;
                                showColumns(this, 'YLJGMC');
								$(".yzcCondition [name=USERID]").val(parent.userInfo.USERID);
								getContainerDataByClassName('yzcCondition','condition',params);//查询条件
								formatTdid(params,'YQYTD');
                                formatQueryValue(params);
                                if(StringUtils.isEmpty(params.YQYTD)) return false;
							},
							url: contextRoot+"jtqy/queryZjsqByPage.service"
					})
				}
		}
		
		function formatTdid(params,field){
			if(StringUtils.isEmpty(params[field])){
				var tdidArr = [];
				$("#YLTDID option").each(function(){
					var value = $(this).val();
					if(!StringUtils.isEmpty(value)){
						tdidArr.push(value);
					}
				})
				params[field] = tdidArr.join(',');
			}
		}
		
		/** 导出 */
	   	function download(formName,tdField){
			var obj = {};
			obj[tdField] = $("#" + formName + " [name="+tdField+"]").val();
            formatTdid(obj,tdField)
            formatQueryValue(obj)
	   		$("#"+formName + " [name=TDID]").val(obj[tdField]);
	   		$("#"+formName + " [name=YLJG]").val(obj.YLJGID);
	   		$("#"+formName).submit();
	   	}

	   	/* 展示列 */
	   	function showColumns(this_,fileName){
	   	    if(isGLJG){
                fileName?null:fileName='SZYY'; //默认：fileName='SZYY'
                $(this_).datagrid("showColumn",fileName);
                $(".qytd").hide();
                $(".ssjg").show();
			}
		}

        /**
		 *	各个easyi_tab中医疗机构查询条件处理
		 *  tabIndex: 当前激活的tab的下标（全局变量）
		 * */
        var selectObj = {};
        function formatQueryValue(params){
            var YLJGID = $(".combogridYljg").eq(tabIndex).combobox("getValue");
            var JGMC = $(".combogridYljg").eq(tabIndex).combobox('getText');
            if(!$(".combogridYljg").eq(tabIndex).combogrid("grid").datagrid("getSelected") || (JGMC != selectObj["lastSelectJgmc"+tabIndex] && YLJGID == selectObj["lastSelectJgid"+tabIndex])){
                params.SZYY = JGMC;
                params.YLJGMC = JGMC; //已转出
            }else{
                params["YLJGID"] = YLJGID;
            }
            selectObj["lastSelectJgmc"+tabIndex] = JGMC;
            selectObj["lastSelectJgid"+tabIndex] = YLJGID;

            if(!isGLJG){
                params["YLJGID"] = PTJGID;
            }
        }
	</script>
  </head>
  
  <body style="visibility:hidden ;" >
		<div id="tabs" class="easyui-tabs" fit="true" border="false" >
			<div title="全部">
				<div class="easyui-layout" border="false" fit="true">
					<div region="north" class="north" border="false">
						<form action="downloadQycx.service" method="post" enctype="multipart/form-data" id="downloadAllForm">
							<table class="form-table" id="allCondition">
								<tr>
									<td class="td-text">姓名：</td>
									<td class="td-content">
										<!-- download -->
										<input name="TDID" type="hidden" />
										<input name="YLJG" type="hidden" />
										<input name="tableId" value="allTb" type="hidden" />
										
										<input name="USERID" type="hidden" class="condition"/>
										<input name="XM" class="form-control condition"  style="width: 100%;">
									</td>
									<td class="td-text">证件号码：</td>
									<td class="td-content">
										<div style="display: inline;">
											<input name="ZJHM" class="form-control condition" style="width: 100%;" />
										</div>
									</td>
									<td class="td-text qytd">签约团队：</td>
									<td class="td-content qytd">
										<select id="YLTDID" name="YLTDID" class="form-control condition" style="width: 100%;height:32px;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text ssjg">所属机构：</td>
									<td class="td-content ssjg">
										<input class="form-control combogridYljg" style="width: 100%;" />
									</td>
									<td class="td-text" style="text-align:center;width:150px;">
										<button class="btn btn-info" type="button" onclick="queryTableData('allTb')">查询</button>
										<button class="btn btn-info" type="button" onclick="download('downloadAllForm','YLTDID')">导出</button>
									</td>
								</tr>
								<tr class="activeQuery">
									<td class="td-text">签约时间：</td>
									<td class="td-content">
										 <input id="allStartTime1" name="QYSJ_start" class="laydate-icon condition timeLeft"/>
										 <span class="timeSpan">-</span>
										 <input id="allStopTime1" name="QYSJ_end" class="laydate-icon condition timeRight"/>
									</td>
									<td class="td-text">签约状态：</td>
									<td class="td-content">
										<select name="QYLX" class="form-control condition" style="width: 100%;height:32px;">
											<option value="">请选择</option>
											<option value="00">预签约</option>
											<option value="01">已签约</option>
											<option value="02">转介中</option>
											<option value="03">已解约</option>
											<option value="04">已到期</option>
											<option value="05">已续签</option>
											<option value="06">拒绝预签约</option>
											<option value="07">同意预签约</option>
											<!-- <option value="09">已转介</option> -->
										</select>
									</td>
									<td class="td-text">服务包：</td>
									<td class="td-text" >
										<select class="form-control FWBID condition" name="FWBID" style="width: 100%;height:32px;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text"></td>
								</tr>
							</table>
						</form>
					</div>
					<div region="center" border="false" >
						<table id="allTb"></table>
					</div>
				</div>
			</div>
			
			
			
			
			
			<div title="已到期">
				<div class="easyui-layout" border="false" fit="true">
					<div region="north" class="north" border="false">
						<form action="downloadQycx.service" method="post" enctype="multipart/form-data" id="downloadYdqForm">
							<table class="form-table" id="ydqCondition">
								<tr>
									<td class="td-text">姓名：</td>
									<td class="td-content">
										<!-- download -->
										<input name="TDID" type="hidden" />
										<input name="YLJG" type="hidden" />
										<input name="tableId" value="ydqTb" type="hidden" />
										
										<input name="QYLX" type="hidden" class="condition" value="04"/><!-- 04：已到期 -->
										<input name="USERID" type="hidden" class="condition"/>
										<input name="XM" class="form-control condition" style="width: 100%;">
									</td>
									<td class="td-text">证件号码：</td>
									<td class="td-content">
										<div style="display: inline;">
											<input name="ZJHM" class="form-control condition" style="width: 100%;" />
										</div>
									</td>
									<td class="td-text qytd">签约团队：</td>
									<td class="td-content qytd">
										<select name="YLTDID" class="form-control condition" style="width: 100%;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text ssjg">所属机构：</td>
									<td class="td-content ssjg">
										<input  class="form-control combogridYljg" style="width: 100%;" />
									</td>
									<td class="td-text" style="text-align:center;width:150px;">
										<button class="btn btn-info" type="button" onclick="queryTableData('ydqTb')">查询</button>
										<button class="btn btn-info" type="button" onclick="download('downloadYdqForm','YLTDID')">导出</button>
									</td>
								</tr>
								<tr class="activeQuery">
									<td class="td-text">签约时间：</td>
									<td class="td-content">
										<input id="ydqStartTime1" name="QYSJ_start" class="laydate-icon condition timeLeft"/>
										<span class="timeSpan">-</span>
										<input id="ydqStopTime1" name="QYSJ_end" class="laydate-icon condition timeRight"/>
									</td>
									<td class="td-text">到期时间：</td>
									<td class="td-content">
										<input name="JSSJ" class="laydate-icon condition" onclick="laydate()" style="width:91%;"/>
									</td>
									<td class="td-text">服务包：</td>
									<td class="td-text" >
										<select class="form-control FWBID condition" name="FWBID" style="width: 100%;height:32px;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text"></td>
								</tr>
							</table>
						</form>
					</div>
					<div region="center" border="false">
						<table id="ydqTb"></table>
					</div>
				</div>
			</div>
			
			
			
			
			
			<div title="已解约">
				<div class="easyui-layout" border="false" fit="true">
					<div region="north" class="north" border="false">
						<form action="downloadQycx.service" method="post" enctype="multipart/form-data" id="downloadYjyForm">
							<table class="form-table" id="yjyCondition">
								<tr>
									<td class="td-text">姓名：</td>
									<td class="td-content">
										<!-- download -->
										<input name="TDID" type="hidden" />
										<input name="YLJG" type="hidden" />
										<input name="tableId" value="yjyTb" type="hidden" />
										
										<input name="QYLX" type="hidden" class="condition" value="03"/><!-- 03：已解约 -->
										<input name="USERID" type="hidden" class="condition"/>
										<input name="XM" class="form-control condition" style="width: 100%;">
									</td>
									<td class="td-text">证件号码：</td>
									<td class="td-content">
										<input name="ZJHM" class="form-control condition" style="width: 100%;" />
									</td>
									<td class="td-text qytd">签约团队：</td>
									<td class="td-content qytd">
										<select name="YLTDID" class="form-control condition" style="width: 100%;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text ssjg">所属机构：</td>
									<td class="td-content ssjg">
										<input class="form-control combogridYljg" style="width: 100%;" />
									</td>
									<td class="td-text" style="text-align:center;width:150px;">
										<button class="btn btn-info" type="button" onclick="queryTableData('yjyTb')">查询</button>
										<button class="btn btn-info" type="button" onclick="download('downloadYjyForm','YLTDID')">导出</button>
									</td>
								</tr>
								<tr class="activeQuery">
									<td class="td-text">签约时间：</td>
									<td class="td-content">
										<input id="yjyStartTime1" name="QYSJ_start" class="laydate-icon condition timeLeft" />
										<span class="timeSpan">-</span>
										<input id="yjyStopTime1" name="QYSJ_end" class="laydate-icon condition timeRight" />
									</td>
									<td class="td-text">解约时间：</td>
									<td class="td-content">
										<input id="yjyStartTime2" name="JYSJ_start" class="laydate-icon condition timeLeft"/>
										<span class="timeSpan">-</span>
										<input id="yjyStopTime2" name="JYSJ_end" class="laydate-icon condition timeRight"/>
									</td>
									<td class="td-text">服务包：</td>
									<td class="td-text" >
										<select class="form-control FWBID condition" name="FWBID" style="width: 100%;height:32px;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text"></td>
								</tr>
							</table>
						</form>
					</div>
					<div region="center" border="false">
						<table id="yjyTb"></table>
					</div>
				</div>
			</div>
			
			
			
			
			
			<div title="已转出">
				<div class="easyui-layout" border="false" fit="true">
					<div region="north" class="north" border="false">
						<form action="downloadQycx.service" method="post" enctype="multipart/form-data" id="downloadYzcForm">
							<table class="form-table" id="yzcCondition">
								<tr>
									<td class="td-text">姓名：</td>
									<td class="td-content">
										<!-- download -->
										<input name="TDID" type="hidden" />
										<input name="YLJG" type="hidden" />
										<input name="tableId" value="yzcTb" type="hidden" />
										
										<input name="SHZT" type="hidden" class="condition" value="1"/>
										<input name="USERID" type="hidden" class="condition"/>
										<input name="XM" class="form-control condition" type="text" style="width: 100%;">
									</td>
									<td class="td-text">证件号码：</td>
									<td class="td-content">
										<div style="display: inline;">
											<input name="ZJHM" class="form-control condition" style="width: 100%;" />
										</div>
									</td>
									<td class="td-text qytd">签约团队：</td>
									<td class="td-content qytd">
										<select name="YQYTD" class="form-control condition" style="width: 100%;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text ssjg">所属机构：</td>
									<td class="td-content ssjg">
										<input class="form-control combogridYljg" style="width: 100%;" />
									</td>
									<td class="td-text" style="text-align:center;width:150px;">
										<button class="btn btn-info" type="button" onclick="queryTableData('yzcTb')">查询</button>
										<button class="btn btn-info" type="button" onclick="download('downloadYzcForm','YQYTD')">导出</button>
									</td>
								</tr>
								<tr class="activeQuery">
									<td class="td-text">签约时间：</td>
									<td class="td-content">
										 <input id="yzcStartTime1" name="QYSJ_start" class="laydate-icon condition timeLeft"/>
										 <span class="timeSpan">-</span>
										 <input id="yzcStopTime1" name="QYSJ_end" class="laydate-icon condition timeRight"/>
									</td>
									<td class="td-text">转介时间：</td>
									<td class="td-content">
										<input id="yzcStartTime2" name="SQRQ_start" class="laydate-icon condition timeLeft"/>
										<span class="timeSpan">-</span>
										<input id="yzcStopTime2" name="SQRQ_end" class="laydate-icon condition timeRight"/>
									</td>
									<td class="td-text">服务包：</td>
									<td class="td-text" >
										<select class="form-control FWBID condition" name="FWBID" style="width: 100%;height:32px;">
											<option value="">请选择</option>
										</select>
									</td>
									<td class="td-text"></td>
								</tr>
							</table>
						</form>
					</div>
					<div region="center" border="false">
						<table id="yzcTb"></table>
					</div>
				</div>
			</div>
		</div>
		
		
		
  </body>
</html>
